/*
 * read_write_mayWrite_lock.h
 *
 *  Created on: May 23, 2012
 *      Author: gb
 */
#ifndef READ_WRITE_MAYWRITE_LOCK_H_
#define READ_WRITE_MAYWRITE_LOCK_H_

typedef struct rwmw_lock_t *RWMW_Lock;

RWMW_Lock init_lock();
void destroy_lock(RWMW_Lock l);
void get_read_lock(RWMW_Lock l);
void get_may_write_lock(RWMW_Lock l);
void get_write_lock(RWMW_Lock l);
void upgrade_may_write_lock(RWMW_Lock l);
void release_shared_lock(RWMW_Lock l);
void release_exclusive_lock(RWMW_Lock l);

#endif /* READ_WRITE_MAYWRITE_LOCK_H_ */
